package com.cet.designpatterns.adapter.classadapter;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-07 22:42
 **/
public class Phone {
    public void charging(Voltage5V voltage5V) {
        if (voltage5V.output5V() == 5) {
            System.out.println("电压正常，可以充电！");
        } else if (voltage5V.output5V() > 5) {
            System.out.println("电压过高，无法充电！");
        }
    }
}
